<?php


namespace app\validate;


use think\Validate as TValidate;

class User extends TValidate
{

    protected $rule = [
        'login_name' => 'require|alphaNum',
        'password' => 'require',
        'company_name' => 'require',
        'industry' => 'require',
        'address' => 'require',
        'main_product' => 'require',
        'shopName' => 'require',
        'shopId' => 'require',
        'type' => 'require',
        'idcard' => 'require',
        'mobile' => 'require',
        'name' => 'require',
        'account' => 'require',
        'pwd' => 'require',
    ];

    protected $message = [
        'login_name.require' => '请输入账号',
        'login_name.alphaNum' => '账号只能是数字和字母',
        'password.require' => '请输入密码',
        'company_name' => '请输入公司名',
        'industry' => '请输入行业',
        'address' => '请输入地址',
        'main_product' => '请输入主营产品',
        'shopName' => '请选择药店',
        'shopId' => '请选择药店',
        'type' => '请选择类型',
        'idcard' => '请输入证件号',
        'mobile' => '请输入手机号',
        'name' => '请输入姓名',
        'account' => '输入登录账号',
        'pwd' => '输入密码',
    ];
    protected $scene = [
        'login' => ['user_name', 'password'],
        'register' => ['login_name', 'password', 'company_name', 'industry', 'address'],
        'addocruser' => ['count'],
        'kouzhao' => ['idcard', 'mobile', 'shopName', 'shopId', 'type'],
        'bangding' => ['mobile', 'name', 'account', 'pwd']
    ];


}